import 'package:flutter/material.dart';
import 'package:fluttertoast/fluttertoast.dart';
import 'dialogs/myDialog.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        theme: ThemeData(
          useMaterial3: false,
          primarySwatch: Colors.blue,
        ),
        home: Scaffold(
          appBar: AppBar(
            title: const Text("Flutter App"),
          ),
          body: const MyHome(),
        ));
  }
}

class MyHome extends StatefulWidget {
  const MyHome({super.key});

  @override
  State<MyHome> createState() => _MyHomeState();
}

class _MyHomeState extends State<MyHome> {

  @override
  Widget build(BuildContext context) {
    return SizedBox(
      height: 200,
      child: PageView(
        allowImplicitScrolling:true,
        scrollDirection:Axis.horizontal,
        children: const [
          Image(image: NetworkImage("https://www.itying.com/images/flutter/1.png"),fit: BoxFit.cover,),
          Image(image: NetworkImage("https://www.itying.com/images/flutter/2.png"),fit: BoxFit.cover,),
          Image(image: NetworkImage("https://www.itying.com/images/flutter/3.png"),fit: BoxFit.cover,),
        ],
      ),
    );
  }
}
